import _axios from '../plugins/axios';
import store from '../store';
import {getParamsStr} from "../utils";

class Bargain {
	createBargain(id) {
		let token = store.state.user.token;
		return _axios.post('small4/shop/goods/kanjia/join?token=' + token + '&kjid=' + id)
	}

	getBargainInfo(params) {
		let query = getParamsStr(params);
		return _axios.post('small4/shop/goods/kanjia/info?' + query);
	}

	helpBargain(params) {
		let query = getParamsStr(params);
		return _axios.post('small4/shop/goods/kanjia/help?' + query);
	}
}

export default Bargain;
